package com.example.publish_model.pushorpull;

import com.blankj.utilcode.util.LogUtils;

import java.util.concurrent.BlockingQueue;

public class ProducerGift implements Runnable{

    private BlockingQueue<String> blockingQueue;
    private  String name;

    public ProducerGift(BlockingQueue<String> blockingQueue, String name) {
        this.blockingQueue = blockingQueue;
        this.name = name;
    }

    @Override
    public void run() {
        try {
            blockingQueue.put(name);
            LogUtils.e("入队:"+name);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
